<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="isperp" uri="/WEB-INF/tlds/isperp.tld"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>


<isperp:changeView>

	<jsp:body> 
<form class="validate" id="changeForm" action="change/change/save"
			method="post">
	<input name="id" type="hidden" value="${model.id }">

	<table class="form-table">
		<jsp:include page="step1view.jsp"></jsp:include>
		<jsp:include page="changeRelateConciView.jsp"></jsp:include>
		<jsp:include page="step2view.jsp"></jsp:include>
		<jsp:include page="step3view.jsp"></jsp:include>
		
		<tr>
			<td class="td2" colspan="4">
				<div class="header">
					<h3>验收</h3>
				</div>
			</td>
		</tr>
		 <tr>
			<td class="td1">实施后效果评估：</td>
			<td class="td2" colspan="3"><textarea id="effectEvaluation"
							name="effectEvaluation" class="required">${model.effectEvaluation }</textarea>

			</td>
		</tr>

	</table>


</form>

	</jsp:body>

</isperp:changeView>

<isperp:buttonList>
	<isperp:processButtons processKey="changeProcess" formId="changeForm"
		processId="${model.processId }" businessKey="${model.id }"></isperp:processButtons>
</isperp:buttonList>


<script type="text/javascript">
	function formatSelector(rowObject, gridId) {
		return "<a class=\"nui-txt-link\" onclick=\"" + gridId + ".jqGrid.setSelection('" + rowObject.id + "');" + gridId + "Selected();\">选择</a>";
	}

	function formatCiName(rowObject) {
		return "<a href=\"javascript:isperp.openDialog({contentUrl:'configuration/ci/ciResumeView?id=" + rowObject.id + "'});\">" + rowObject.name + "</a>";
	}

	var assAssectGridSelected = function(id, name) {
		if (!id && !name) {
			var selectedRow = assAssectGrid.getRowData();
			id = selectedRow.id;
			name = selectedRow.name;
		}
		if (id && name) {
			var msg = {
				id : id,
				name : name
			};
			var rs = formatCiName(msg);
			$("#assAssetId").val(id);
			$("#ci_idMsg").html(rs);
		}
	};

	function customerCi_Onclick() {
		isperp.openDialog({
			onThisWindow : true,
			title : "选择关联资产",
			windowSize : "normal",
			contentUrl : "customer/customer/customerCiEdit?customerId=",
			buttons : [ {
				text : "确定",
				"class" : "nui-mainbtn",
				click : function() {
					var $me = $(this);
					$me.find("iframe")[0].contentWindow.getSelectRow(function(id, name) {
						assAssectGridSelected(id, name);
						$me.wijdialog("close");
					});
				}
			}, {
				text : "关闭",
				"class" : 'grey',
				click : function() {
					$(this).wijdialog("close");
				}
			} ]
		});

	}
</script>

